package com.usian.feign;

import com.usian.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("usian-sso-service")
public interface SsFeign {
    @RequestMapping("/service/checkUserInfo/{checkValue}/{checkFlag}")
    public boolean checkUserInfo(@PathVariable String checkValue,
                                 @PathVariable Integer checkFlag);
    @RequestMapping("userRegister")
    int userRegister(@RequestBody TbUser tbUser);
    @RequestMapping("userLogin")
    Map userLogin(@RequestParam String username,@RequestParam String password);
    @RequestMapping("logOut")
    Boolean logOut(@RequestParam String token);
    @RequestMapping("getUserByToken/{token}")
    TbUser getUserByToken(@PathVariable String token);
}
